package com.itheima.Test001;
//这是一个测试类;
public class Demo {
    public static void main(String[] args) {
        //父类引用指向子类对象
        Animal a = new Cat();
        //向上转换,编译看父类,执行看父类;
        a.eat();
        //向下转换,编译看父类,执行看子类;
        Cat c = (Cat) a;
        c.method();


    }
}
